import Router from '@koa/router';
import * as memberLevelController from '../controllers/memberLevel.controller';
import { authMiddleware } from '../middleware/auth';

const router = new Router({
  prefix: '/api/member-levels',
});

// 所有路由都需要认证
router.use(authMiddleware);

// 创建会员等级
router.post('/create', memberLevelController.createMemberLevel);

// 更新会员等级
router.post('/update', memberLevelController.updateMemberLevel);

// 删除会员等级
router.post('/delete', memberLevelController.deleteMemberLevel);

// 查询会员等级列表
router.post('/list', memberLevelController.getMemberLevelList);

// 查询会员等级详情
router.post('/detail', memberLevelController.getMemberLevelDetail);

export default router;

